package cn.hfjava;

import java.text.MessageFormat;

public class VariableDemo {

  // psvm/main

    public static void main(String[] args) {
        String name = "李明";
        int age = 19;
        char gender = '男';
        double score = 95.5;
        String format = String.format("姓名%s,年龄:%d,性别:%c,分数:%.1f", name, age, gender, score);
        //MessageFormat.format()
        System.out.println(format);
    }

}
